<template>
  <a-modal :footer="null" width="60%" v-model="visible" :title="title" @ok="handleOk">
    <div class="htmlPre" v-html="content"></div>
  </a-modal>
</template>
<script>

  export default {
    name: 'contentView',
    components: {},
    data() {
      return {
        visible: false,
        title: '',
        content: ''
      }
    },
    created() {
    },
    watch: {},
    methods: {
      show(data) {
        console.log(data);
        this.title = data.title
        this.content = data.content
        this.visible = true
      },
      handleOk() {
        this.visible = false
      }
    }
  }
</script>
<!--<style>-->
<!--  pre {-->
<!--    white-space: pre-wrap !important;-->
<!--    word-wrap: break-word !important;-->
<!--  }-->
<!--</style>-->
<style lang="less">
  .htmlPre {
    max-height: 70vh;
    overflow-y: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
  }
</style>
